package cz.uhk.max.export.excel;

import java.util.List;

import cz.uhk.max.exceptions.ExportException;
import cz.uhk.max.locator.ServiceLocator;
import cz.uhk.max.log.Progress;
import cz.uhk.max.log.ProgressLogger;
import cz.uhk.max.thread.ImmediateStartAction;
import cz.uhk.max.thread.Interval;

public class ExportExtortionStatsAction extends ImmediateStartAction {

	@Override
	public Interval getInterval() {
		return Interval.DAY;
	}

	@Override
	public int getLoopCount() {
		return 1;
	}

	@Override
	public void processAction(ServiceLocator locator) {
		ProgressLogger.getProgressLogger().init(Progress.EXPORT_EXTORTION_STATS);
		try {
			locator.getEquationService().exportMatrix();
			logger.info("Export matice vymáhání proběhl úspěšně");
			ProgressLogger.getProgressLogger().clear();
		} catch (ExportException e) {
			e.printStackTrace();
			logger.error("Chyba pri exportu matice", e);
		}			
		
	}

}
